<?php
require_once("../config.php"); 
require_once("../model/DB.php");
require_once("../model/Class.php");

if($_POST['id']!=0){
	if(Classes::editKid($_POST['id'],$_POST['title'],$_POST['grade'])){
		echo "saved";
	}	
}
else{
	if(Classes::addClass($_POST['title'],$_POST['grade'])){
		echo "added";
	}
}


?>